package de.hsw.facebook.model.rowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import de.hsw.facbook.model.entities.Like;

/**
 * 
 * @author D20017
 *
 */

public class LikeRowMapper {
	
	private Log logger = LogFactory.getLog(LikeRowMapper.class);
	
	public Like mapLike(ResultSet rs) throws SQLException {
		logger.debug("-> entering mapLikes");
		// Erstellen eines Like-Objekts
		Like like = new Like() ;
		
		// Laden der Werte in das Like-Objekt
		like.setLikeId(rs.getInt("likeId"));
		like.setPostId(rs.getInt("postId"));
		like.setAccountId(rs.getInt("accountId"));
		
		
		return like;
	}

}
